Skip to main content

GetSpacingLineValue

Returns the paragraph line spacing value.

Syntax

expression.GetSpacingLineValue();

expression - A variable that represents a ApiParagraph class.

Parameters

This method doesn't have any parameters.

Returns

twips | line240 | undefined

Example

This example shows how to get the paragraph line spacing value.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let paraPr = paragraph.GetParaPr();
paraPr.SetSpacingLine(3 * 240, "auto");
paragraph.AddText("Paragraph 1. Spacing: 3 times of a common paragraph line spacing.");
paragraph.AddLineBreak();
paragraph.AddText("These sentences are used to add lines for demonstrative purposes. ");
paragraph.AddText("These sentences are used to add lines for demonstrative purposes. ");
paragraph.AddLineBreak();
let spacingLineValue = paraPr.GetSpacingLineValue();
paragraph.AddText("Spacing line value: " + spacingLineValue);